Skip to content

Fail boot if DAC is in ITS with KMU enabled - #766

Open
ArekBalysNordic wants to merge 1 commit into
nrfconnect:ncs-matter-v1.0-branchfrom
ArekBalysNordic:fix_dac_its
Open

ArekBalysNordic wants to merge 1 commit into
nrfconnect:ncs-matter-v1.0-branchfrom
ArekBalysNordic:fix_dac_its

Conversation

@ArekBalysNordic

Copy link
Copy Markdown
Contributor

Summary

Add CONFIG_CHIP_CRYPTO_PSA_DAC_PRIV_KEY_FATAL_IF_IN_ITS to detect
a DAC private key still stored in PSA ITS when factory data is
configured for CRACEN KMU.

Testing

ncs-matter

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unexpected PSA lookup errors bypass the boot guard, and the advertised configuration option is missing.

2 open issues
What changed in this PR

This PR adds a boot-time check to the nRF Connect factory-data provider to reject a device attestation certificate (DAC) private key remaining in PSA ITS when CRACEN KMU storage is configured.

Changes:

  • Checks for the ITS key before moving factory-data credentials into secure storage.
  • Logs a reprovisioning message and aborts initialization when the key is found.
File Description
src/​platform/​nrfconnect/​FactoryDataProvider.h Declares the KMU-specific ITS key check.
src/​platform/​nrfconnect/​FactoryDataProvider.cpp Implements the lookup and invokes the fatal boot guard.

Review effort: Balanced

Comment thread src/platform/nrfconnect/FactoryDataProvider.cpp Outdated
Comment thread src/platform/nrfconnect/FactoryDataProvider.cpp Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The advertised configuration option is missing, leaving the fatal-check policy unconditional for KMU builds.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

…lected

Detect when the DAC private key remains in PSA ITS while factory data
is configured to migrate the key to CRACEN KMU. Abort boot in that
case unless CHIP_CRYPTO_PSA_DAC_PRIV_KEY_KMU_ITS_FALLBACK is enabled;
then sign attestations with the ITS key and log a warning because
ITS-to-KMU migration is not supported.

Extend KMU-related Kconfig dependencies to CRACEN_LIB_KMU.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants